package com.itany.corejava.code08_常用类.泛型;

/**
 * @author MissChen
 * @version 1.0
 * @date 2023 年11月16日 10:04
 */
public class Student<T>{
    private T stuId;
    private String stuName;

    public Student() {
    }

    public Student(T stuId, String stuName) {
        this.stuId = stuId;
        this.stuName = stuName;
    }

    public T getStuId() {
        return stuId;
    }

    public void setStuId(T stuId) {
        this.stuId = stuId;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    @Override
    public String toString() {
        return "Student{" +
                "stuId=" + stuId +
                ", stuName='" + stuName + '\'' +
                '}';
    }
}

class Student2{
    private Object no;

    public Student2() {
    }

    public Student2(Object no) {
        this.no = no;
    }

    public Object getNo() {
        return no;
    }

    public void setNo(Object no) {
        this.no = no;
    }

    @Override
    public String toString() {
        return "Student2{" +
                "no=" + no +
                '}';
    }
}